import request from '@/utils/request'
export const getConpany = id => request({
  url: `/company/${id}`
})

// 获取所有角色列表
export const getAllRole = params => request({
  url: '/sys/role',
  params
})

// 添加角色
export const addAllRole = data => request({
  url: '/sys/role',
  method: 'POST',
  data
})
// 根据ID删除角色
export const delAllRole = id => request({
  url: `/sys/role/${id}`,
  method: 'DELETE'
})
// 根据ID获取角色详情
export const getAllRoleById = id => request({
  url: `/sys/role/${id}`,
  method: 'GET'
})
// 根据ID更新角色
export const updateAllRole = data => request({
  url: `/sys/role/${data.id}`,
  method: 'PUT',
  data
})
